import request from '@/utils/request'

/**
 * axios.create() 生成请求对象实例
 * request({
    url: '',
    method: 'get/post',
    params/data: {}
   })
   返回promise实例
 */

export function login(data) {
  return request({
    url: '/webapi?op=login',
    method: 'get',
    params: data,
  })
}

export function getInfo(token) {
  return request({
    url: '/webapi?op=get_system_status',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/webapi/login?op=logout',
    method: 'get'
  })
}
